﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

using System.Windows.Data;
using System.Collections.ObjectModel;

using HolisticWare.VoIP.Getafisk.DLL_02BL_netfx35;

namespace HolisticWare.VoIP.Getafisk.EXE_01PL_05netfx30.SL30.any_any_any.UserControls
{
	public partial class SilverlightControlExtensions : UserControl
	{
		private
			ObservableCollection<Extension> 
			oc_extensions
			;

		public SilverlightControlExtensions()
		{
			InitializeComponent();

			DataBind();

			return;
		}

		private 
			void 
			DataBind
			(
			)
		{
			PagedCollectionView pcv_extensions;

			oc_extensions = Extension.Extensions();
			pcv_extensions = new PagedCollectionView(oc_extensions);
			// Master-Detail not bound
			//DataContext = Extension.Extensions();
			// Master-Detail bound
			DataContext = pcv_extensions;

			Master.ItemsSource = pcv_extensions;
			Details.ItemsSource = pcv_extensions;

			// Detail.CommandButtonsVisibility = 
			
			return;
		}

		private void DataGrid_RowEditEnded(object sender, DataGridRowEditEndedEventArgs e)
		{
			return;
		}
	}
}
